/* eslint-disable */
export default {
  data() {
    return {
      radio1:"计划科",
      dialogVisible: false,
      type: 1,
      planInfo: {
        reason: "",
        username: "huhuhuhr",
        selectedPlanName: "",
        selectedPlanId: ""
      },
      // ‘新增模板’表单数据
      companyFrom:{
        companyName: '',
        companyContact: '',
        companyTel: '',
        requisitionLimit: '',
        restrictedType: '',
        repairAssetType: '',
        restrictedType1:''
      },
      // '新增项目'表单验证
      companyRules: {
        companyName: [
          { required: true, message: '请输入模板名称', trigger: 'blur' },
        ],
        companyContact: [
          { required: true, message: '请输入创建人', trigger: 'blur' },
        ],
        companyTel: [
          { required: true, message: '请选择项目类别', trigger: 'blur' },
        ],
        requisitionLimit: [
          { required: true, message: '请选择专项', trigger: 'blur' },
        ],
        restrictedType: [
          { required: true, message: '请选择创建时间', trigger: 'blur' },
        ],
        restrictedType1: [
          { required: true, message: '请选择任务节点', trigger: 'blur' },
        ]
      },
      planList: [
        {
          label: "龙华路智谷北区一期",
          value: "1",
        },
        {
          label: "龙华路智谷北区二期",
          value: "2",
        },
        {
          label: "龙华路智谷北区三期",
          value: "3",
        }
      ],
      dealPlanList: [
        {
          dealNo: 1115656165,
          createTime: "2018-02-01 11:08",
          planDeal: "龙华智谷北区一期项目",
          oldPerson: "张三",
          newPerson: "李四",
        },
        {
          dealNo: 1115656135,
          createTime: "2018-02-01 11:08",
          planDeal: "龙华智谷北区二期项目",
          oldPerson: "张三",
          newPerson: "李四",
        }
      ],
      // 新增资产弹窗
      dialogAssetAdd: {
        title: '计划详情',
        status: false,
      },
      dialogCompany:{
        title: '计划变更',
        status: false,
      },
      detail: {
        number:1,
        date: "2018-01-11",
        planName: "龙华智谷北区一期"
      }
    }
  },
  created() {
    this.type = 1
  },
  mounted() {
    this.type = 1

  },
  methods: {
// 新增模板弹窗
    dialogCompanyOpen(row){
      this.dialogCompany.status = true
    },

    open() {
      this.$message('这是一条消息提示');
    },
    // 资产弹窗
    dialogAsset(row) {
      // this.assetAddFrom = row
      this.dialogAssetAdd.status = true
    },
    agree() {
      this.$message('同意成功');
    },
    reject() {
      this.$message('驳回成功');
    },
    update() {
      this.$message('更新成功');
    },
    urge(data) {
      this.$message('催办成功');
    },
    cancel() {
      this.$message('取消成功');
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done();
        })
        .catch(_ => {
        });
    },
    goChange() {
      this.type = 0;
    },
    operation(object) {

    },
    changeType(type) {
      this.type = type
      console.log(this.type)
    },
    sumbit() {
      if (this.planInfo.selectedPlanId) {

      }
      console.log(this.planInfo)
      this.type = 1;
    },
    submitCancel() {
      this.planInfo = {
        reason: "",
        username: "huhuhuhr",
        selectedPlanName: "",
        selectedPlanId: ""
      };
      this.type = 1;
    }
  },
}
